import 'package:explore/tool/textfield.dart';
import 'package:flutter/material.dart';

class PwdInput extends StatefulWidget {
  final Function(String) setVaule;
  final String name;
  const PwdInput({required this.setVaule, required this.name, super.key});

  @override
  State<StatefulWidget> createState() => _PwdInput();
}

class _PwdInput extends State<PwdInput> {
  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        Expanded(
          child: TextField(
            obscureText: true,
            decoration: InputDecoration(
              border: const OutlineInputBorder(),
              labelText: widget.name,
            ),
            onChanged: (value) => {widget.setVaule(value)},
          ),
        ),
      ],
    );
  }
}
